/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.chl.hansena.webshop.nbp;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author hansena
 */
public class ShoppingCart {
    private final List<String> items = new ArrayList<String>();

    public void addItem(String item)
    {
        items.add(item);
    }

    public List getItems()
    {
        //StringBuilder b = new StringBuilder();
        //for(String s : items){
          //  b.append(s);
            
        //}
        //return b.toString();
        return items;
    }
    public String itemsToString(){
        StringBuilder b = new StringBuilder();
        for(String s : items){
           b.append(s);
           b.append("\n");
        }

        return b.toString();
    }
}



